<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html><!-- InstanceBegin template="/Templates/Function Info.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>WinXScroll_SetPage</title>
<!-- InstanceEndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
<style type="text/css">
<!--
.style3 {font-size: medium}
-->
</style>

<link href="../../WinXStyles.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {
	font-size: x-large;
	font-family: Verdana, Arial, Helvetica, sans-serif;
}
.style2 {
	font-size: large;
	font-family: Verdana, Arial, Helvetica, sans-serif;
}
-->
</style>
</head>

<body>
<h1 class="style1"><img src="../../WinX48.png" width="48" height="48" align="absmiddle"> <!-- InstanceBeginEditable name="title" -->WinXScroll_SetPage<!-- InstanceEndEditable --></h1>
<hr>

<!-- InstanceBeginEditable name="Prototype" -->
<p>WinXScroll_SetPage (hWnd, direction, DOUBLE mul, constant, scrollUnit)</p>
<!-- InstanceEndEditable --><!-- InstanceBeginEditable name="Description" -->
<p>Sets the page mapping function for a scrollbar associate with a window </p>
<!-- InstanceEndEditable -->
<table width="80%" border="1" cellpadding="0" cellspacing="0">
  <tr bgcolor="#CCCCCC">
    <th width="24%"><span class="style3">Parameter</span></th>
    <th width="76%"><span class="style3">Description</span></th>
  </tr>
  <!-- InstanceBeginRepeat name="Parameter Table" --><!-- InstanceBeginRepeatEntry -->
  <tr bgcolor="#E8E8E8">
    <td><!-- InstanceBeginEditable name="Parameter" -->hWnd<!-- InstanceEndEditable --></td>
    <td><!-- InstanceBeginEditable name="Description" -->The handle to the window the scrollbar belongs to <!-- InstanceEndEditable --></td>
  </tr>
  <!-- InstanceEndRepeatEntry --><!-- InstanceBeginRepeatEntry -->
  <tr bgcolor="#E8E8E8">
    <td><!-- InstanceBeginEditable name="Parameter" -->direction<!-- InstanceEndEditable --></td>
    <td><!-- InstanceBeginEditable name="Description" -->The direction of the scrollbar, see remarks for more info <!-- InstanceEndEditable --></td>
  </tr>
  <!-- InstanceEndRepeatEntry --><!-- InstanceBeginRepeatEntry -->
  <tr bgcolor="#E8E8E8">
    <td><!-- InstanceBeginEditable name="Parameter" -->DOUBLE mul <!-- InstanceEndEditable --></td>
    <td><!-- InstanceBeginEditable name="Description" -->The constant to multiply the window size by to get the page size, see remarks for more info <!-- InstanceEndEditable --></td>
  </tr>
  <!-- InstanceEndRepeatEntry --><!-- InstanceBeginRepeatEntry -->
  <tr bgcolor="#E8E8E8">
    <td><!-- InstanceBeginEditable name="Parameter" -->constant<!-- InstanceEndEditable --></td>
    <td><!-- InstanceBeginEditable name="Description" -->The constant to add to adjust the page size, see remarks for more info <!-- InstanceEndEditable --></td>
  </tr>
  <!-- InstanceEndRepeatEntry --><!-- InstanceBeginRepeatEntry -->
  <tr bgcolor="#E8E8E8">
    <td><!-- InstanceBeginEditable name="Parameter" -->scrollUnit<!-- InstanceEndEditable --></td>
    <td><!-- InstanceBeginEditable name="Description" -->The number of units to scroll when the scrollbar arrow is clicked <!-- InstanceEndEditable --></td>
  </tr>
  <!-- InstanceEndRepeatEntry --><!-- InstanceEndRepeat -->
</table>
<h3>Returns</h3>
<!-- InstanceBeginEditable name="Return Info" -->
<p>$$TRUE on success or $$FALSE on fail </p>
<!-- InstanceEndEditable -->
<h3>Remarks</h3>
<!-- InstanceBeginEditable name="Remarks" -->
<p>The direction parameter identifies the scrollbar to set the page size for. Possible values are:</p>
<dl>
  <dt>$$DIR_HORIZ</dt>
  <dd>The horizontal scrollbar</dd>
  <dt>$$DIR_VERT</dt>
  <dd>The vertical scrollbar</dd>
</dl>
<p>The page mapping function turns the size (width or height depending on the scrollbar) of the window into a page size. It does this by multiplying the size of the window by a constant, then adding another constant. In other words, it is a linear function of the form page = mx+c.</p>
<p>In this way, you can define the scrolling units to be whatever is convienient. The only requirement is that you can use a linear function to map between pixels and the scrolling units.</p>
<!-- InstanceEndEditable -->
<h3>Examples</h3>
<table width="80%"  border="0">
  <tr>
    <td bgcolor="#C6C6FF"><!-- InstanceBeginEditable name="Example Code" --><span class="codeStyle">'Set the page size to be the same as the window size for both scrollbars<br>
      'and set the distance to scroll when the arrows are clicked to 10 pixels<br>
    WinXScroll_SetPage (#hMain, $$DIR_VERT, 1, 0, 10)<br>
    WinXScroll_SetPage (#hMain, $$DIR_HORIZ, 1, 0, 10)</span><!-- InstanceEndEditable --></td>
  </tr>
</table>

<h2 class="style2">Related Links</h2>
<!-- InstanceBeginEditable name="Related Links" -->
<p><a href="../../WinX%20Programmer%27s%20Guide/Scrolling.htm">Scrolling</a><br>
  <a href="WinXScroll_Show.htm">WinXScroll_Show</a><br>
  <a href="WinXScroll_SetRange.htm">WinXScroll_SetRange
</a></p>
<!-- InstanceEndEditable -->
</body>
<!-- InstanceEnd --></html>
